package com.willian.andrappfw.utils;

public class DoubleClickDetector {
    private static final long MIN_CLICK_GAP = 400L;
    private static long sLastClickTime = 0L;

    public DoubleClickDetector() {
    }

    public static boolean isDoubleClick() {
        long now = System.currentTimeMillis();
        boolean isDoubleClick = now - sLastClickTime < 400L;
        if (!isDoubleClick) {
            sLastClickTime = now;
        }

        return isDoubleClick;
    }
}
